import 'reflect-metadata'
import { DataSource } from 'typeorm'
import { User } from './entity/User'
import { UserInfo } from './entity/UserInfo'
import { UserGroup } from './entity/UserGroup'

export const AppDataSource = new DataSource({
  type: 'mysql',
  host: 'localhost',
  port: 3306,
  username: 'root',
  password: '123456',
  database: 'koa',
  synchronize: true,
  logging: false,
  // entities: [__dirname + '/entity/*.ts'],
  entities: [User, UserInfo, UserGroup],
  migrations: [],
  subscribers: [],
})
